@import "ui-mixins";
@import "ui-variables";

button {
    display: inline-block;
}
.btn, button {
    padding: 0;
    height: 2.25rem;
    line-height: 2.25rem;
    padding: 0 1rem;
    background: @app-background-color;
    transition: box-shadow 250ms @md-timing-function, background 250ms @md-timing-function;
    text-transform: uppercase;
    color: @text-color;
    outline: none;
    border: none;
    margin: 0.25rem 0;
    vertical-align: middle;
    .z-depth-1();

    &:hover {
        color: @text-color;
        background: @app-background-color;
        .z-depth-2();
    }
    &:active, &:focus {
        color: @text-color;
        background: lighten(@app-background-color, 1.5%);
        outline: none;
        border: none;
        .z-depth-2();
    }
    &.icon::before {
        margin-right: 1rem;
    }
    &[disabled], &.disabled {
        opacity: 0.5;
        background: darken(@app-background-color, 2.5%);
        pointer-events: none;
        box-shadow: none;
    }
    .btn-group & {
        margin: 0;
        box-shadow: none;
        border: none;

        &:only-child {
            .z-depth-1();

            &:hover {
                .z-depth-2();
            }
            &[disabled], &.disabled {
                box-shadow: none;
            }
        }
    }
    &.selected {
        background: @base-color;
        color: @accent-text-color;

        &:hover {
            background: desaturate(lighten(@base-color, 5%), 20%);
        }
        &:active, &:focus {
            outline: none;
        }
    }
    &.btn-primary {
        background-color: @base-color;
        color: @accent-text-color;
    }
    &.btn-success {
        background-color: @md-light-green;
        color: #FFF;
    }
    &.btn-lg {
        font-size: 1.25rem;
        line-height: 3rem;
        padding: 0 1.5rem;
        font-weight: 300;

        &.icon::before {
            font-size: 1.25rem;
        }
    }
    &.btn-sm {
        font-size: 0.85rem;
        line-height: 1.75rem;
        padding: 0 0.75rem;

        &.icon::before {
            font-size: 0.75rem;
        }
    }
    &.btn-xs {
        font-size: 0.75rem;
        line-height: 1.125rem;
        padding: 0 0.75rem;

        &.icon::before {
            font-size: 0.5rem;
        }
    }
}
.btn-group {
    min-height: 0;
    line-height: 1;
    height: 2.25rem;
    display: inline-block;
    vertical-align: middle;

    + .btn-group {
        margin-left: 1rem;
    }
    &.btn-group-lg {
        button {
            font-size: 1.25rem;
            line-height: 3rem;
            padding: 0 1.5rem;
            font-weight: 300;
        }
    }
    &.btn-group-sm {
        button {
            font-size: 0.75rem;
            line-height: 1.5rem;
            padding: 0 0.75rem;
        }
    }
    &.btn-group-xs {
        button {
            font-size: 0.5rem;
            line-height: 1rem;
            padding: 0 0.5rem;
        }
    }
    &.btn-block {
        display: block;
    }
}
